import { defineComponent } from 'vue';
import { WrapTitle, VueChart } from '@common/index';

export default defineComponent({
  name: 'TechLayout',
  props: {
    data: String,
  },
  render(props) {
    return (
      <div id="TechLayout">
        <WrapTitle title="技术布局"></WrapTitle>
        {props?.data?.length > 0 ? (
          <VueChart
            height="370px"
            option={{
              series: {
                type: 'sunburst',
                data: props.data,
                radius: ['25%', '100%'],
                itemStyle: {
                  borderWidth: 1,
                  borderColor: '#383B71',
                },
                label: {
                  color: '#052327',
                },
                nodeClick: false,
                sort: null,
                center: ['50%', '50%'],
                emphasis: {
                  focus: 'none',
                },
              },
            }}
          />
        ) : (
          <div class="card_null">
            <img src={require('@assets/img_null.png')} width={56} height={74} />
          </div>
        )}
      </div>
    );
  },
});
